<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="js/jquery-3.6.0.js"></script>
    <script src="js/jquery-3.6.0.min.js"></script>
    <script>
      $(function(){
        $.ajax({
          url:"adminCheckBar",
          dataType:"json",
          type:"POST",
          data:{adminCode:"admin"},
          success:function(data){
              var lis = '<tr>' +
                          '<td width="100">贴吧id</td>' +
                          '<td width="100">贴吧名</td>' +
                          '<td width="100">吧主</td>' +
                          '<td width="200">贴吧公告</td>' +
                          '<td width="100">通过/不通过</td>' +
                        '</tr>' ;
              for(var i=0;i<data.length;i++){
                  var pb = '<tr>'+
                      '<td width="100">' + data[i].bar_id + '</td>' +
                      '<td width="100">' + data[i].bar_name + '</td>' +
                      '<td width="100">' + data[i].bar_host + '</td>' +
                      '<td width="200">' + data[i].notice + '</td>' +
                      '<td width="100">' + '<form>' +
                          '<button type="submit" class="inputButton" value="1" name="data[i].bar_id">通过</button>' +
                          '<button type="submit" class="inputButton" value="2" name="data[i].bar_id">不通过</button>' +
                      '</form>' + '</td>' +
                  '</tr>';
                  lis+=pb;
              }
              $("#checkTable").html(lis);
            },
          })
        }
      )
    </script>
</head>
<body>
<table border="1"  cellspacing="0" id="checkTable">
<!--  <tr>-->
<!--    <td width="100">贴吧id</td>-->
<!--    <td width="100">贴吧名</td>-->
<!--    <td width="100">吧主</td>-->
<!--    <td width="200">贴吧公告</td>-->
<!--    <td width="100">通过/不通过</td>-->
<!--  </tr>-->
</table>
</body>
</html>